#ifndef FORMULAELEMENT_H_INCLUDED
#define FORMULAELEMENT_H_INCLUDED

#include <string>
#include "../util/linkedlist/linkedlist.h"

class FormulaElement {
    private:

    public:
        virtual std::string& toString()=0;
        // classic toString()
        FormulaElement();
        // empty constructor
        virtual ~FormulaElement()=0;
        // virtual destructor
        virtual void evaluateMe(LinkedList<double>& evaluationStack, const double* positionArray)=0;
        // element does its one specialitys to evaluate the formula
        // returns false if successfull, otherwise true
        virtual bool isNumber()=0;
        // to test wheter we have a number or an operation (important to level-tests, eg. mutation)
        // returns true if it is a number or variable
        virtual void mutate()=0;
        // mutate this element
        virtual FormulaElement& copy()=0;
        // returns a copy of itself
        virtual void createHumanReadeableToString(LinkedList<std::string>& toStringStack)=0;
        // add this element to the human readeable toString
};

#endif // FORMULAELEMENT_H_INCLUDED
